
#include <system.h>
#include <drivers/input/mouse.h>

//char Check_PS2_MOUSE(MouseDriver * driver);

unsigned int Mouse_Type = M_UNKNOWN;
static MouseDriver mouse_driver, rmouse_driver;

int Init_Mouse(void)
{
	if (Check_PS2M(&rmouse_driver))		return M_PS2;
	return 0x00;
}

char Mouse_init(void)
{
	Mouse_Type = Init_Mouse();
	if (rmouse_driver.detectmouse == NULL)
	{
		printf("mouse: Not Found supported mouse, or not all functions supported by driver now.\n");
		printf("         Mouse disabled.\n");
	}
	else
	{
		/*if(Mouse_Type == 0x00)
			printf("mouse: no mouse detected\n");
		else
		{
			printf("mouse: mouse detected\n");
			mouse_driver = rmouse_driver;
		}*/
		mouse_driver = rmouse_driver;
		if(rmouse_driver.mouse_install != NULL)
			rmouse_driver.mouse_install();
		else
			printf("Mouse Install funtion not enabled");
	}
	return 0;

}
